package thread.processing;
import static java.lang.System.out;

public class HelloSleep2 {

	public static void main(String[] args){
		Runnable runnable = new Runnable(){
			@Override
		    public void run(){
				String threadName = Thread.currentThread().getName();
				for (int i=0; i < 10; i++){
					out.println(threadName);
					try{
						Thread.sleep(1000);
					}catch(InterruptedException e){
						out.println(e.toString());
					}
				}
		    }
		};
		new Thread(runnable).start();
		new Thread(runnable).start();
	}

}
